﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ElingOA6_Admin_DSJCJ.BLL
{
    /// <summary>
    /// 信息引用 逻辑类
    /// </summary>
    public class DocRefImp
    {
        /// <summary>
        /// 信息引用DAL
        /// </summary>
        private DAL.DocRefImp docRefImpDAL = new DAL.DocRefImp();
        public DocRefImp()
        {
        }

        /// <summary>
        /// 取消信息引用
        /// <creator>wangl</creator>
        /// <date>2014-08-07</date> 
        /// </summary>
        /// <param name="docIdList">信息编号列表</param>
        /// <param name="docClsCdList">信息引用编号</param>
        public void CancelDocumentRef(List<decimal> docIdList, List<string> docClsCdList, string entityNo)
        {
            docRefImpDAL.CancelDocumentRef(docIdList, docClsCdList, entityNo);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<ElingOA6_Admin_DSJCJ.Model.DocRefImp> DataTableToList(DataTable dt)
        {
            List<ElingOA6_Admin_DSJCJ.Model.DocRefImp> modelList = new List<ElingOA6_Admin_DSJCJ.Model.DocRefImp>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                ElingOA6_Admin_DSJCJ.Model.DocRefImp model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = docRefImpDAL.DataRowToModel(dt.Rows[n]);
                    if (model != null)
                    {
                        modelList.Add(model);
                    }
                }
            }
            return modelList;
        }
    }
}
